package Book;

import java.util.ArrayList;

public class BookList {
    private ArrayList<Book> books=new ArrayList<Book>();
    public BookList() {
        books.add(new Book("三国演义","罗贯中",19,"小说"));
        books.add(new Book("西游记","吴承恩",29,"小说"));
        books.add(new Book("红楼梦","曹雪芹",25,"小说"));
    }
    public Book getBook(int pos){
        return books.get(pos);
    }
    public void setBook(int pos,Book book){
        books.set(pos,book);
    }
    public ArrayList<Book> getBooks(){
        return books;
    }
}
